package com.qinsheng.domain.strategy.model.entity;

import com.qinsheng.domain.strategy.model.valobj.RuleLogicCheckTypeVO;
import lombok.*;

/**
 * ClassName: RuleActionEntity
 * Description:
 *
 * @Author: qinsheng1900
 * @Create 2025/2/26 22:18
 * @Version 1.0
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity> {

    private String code = RuleLogicCheckTypeVO.ALLOW.getCode();
    private String info = RuleLogicCheckTypeVO.ALLOW.getInfo();
    private String ruleModel;
    private T data;


    static public class RaffleEntity {
        /**
         * 策略ID
         */
        private Long strategyId;

        /**
         * 权重值Key；用于抽奖时可以选择权重抽奖（4000:102，103，104）。
         */
        private String ruleWeightValueKey;

        /**
         * 奖品ID；黑名单，直接告诉奖品Id
         */
        private Integer awardId;

    }
    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    //抽奖前
    static public class RaffleBeforeEntity extends RaffleEntity {
        /**
         * 策略ID
         */
        private Long strategyId;

        /**
         * 权重值Key；用于抽奖时可以选择权重抽奖。
         */
        private String ruleWeightValueKey;

        /**
         * 奖品ID；
         */
        private Integer awardId;

    }

    //抽奖中
    static public class RaffleCenterEntity extends RaffleEntity {
        /**
         * 策略ID
         */
        private Long strategyId;

        /**
         * 权重值Key；用于抽奖时可以选择权重抽奖。
         */
        private String ruleWeightValueKey;

        /**
         * 奖品ID；
         */
        private Integer awardId;
    }

    //抽奖后
    static public class RaffleAfterEntity extends RaffleEntity {

    }
}
